import os
import shutil

ori_path = '/home/sean/data/UWdevkit/det_dataset_0901/test/box/CHN083846'
anno_path = '/home/sean/data/UWdevkit/Annotations/test/video_end'

for dir in os.listdir(ori_path):
    sub_path = os.path.join(ori_path, dir)
    for file in os.listdir(sub_path):
        abs_path = os.path.join(sub_path, file)
        new_filename = 'Video'+str(int(dir))+'_'+file
        new_path = os.path.join(anno_path, new_filename)
        # print(abs_path)
        # print(new_path)
        shutil.copy(abs_path, new_path)
